package com.demo.controller;

import com.demo.utils.JwtUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

@Controller
public class IndexController {
    @GetMapping(value = "/index")
    public String index(HttpServletRequest request){
        String tokens = request.getHeader(JwtUtils.TOKEN_HEADER);
        System.out.println("=================TOKEN的值为：====================");
        System.out.println(tokens);
        return "index";
    }

    @GetMapping(value = "/logouts")
    public String logout() {
        return "logout";
    }
}
